#include "lcmusic.h"

void lcmusic_iterator_init(lcmusic_app_data_t* lcmusic_app_data)
{
    lcmusic_app_data->file_iterator = file_iterator_new(SD_MOUNT_POINT, FILE_TYPE_AUDIO, NULL);
    assert(lcmusic_app_data->file_iterator != NULL);

    lcmusic_app_data->sum_track_no = file_iterator_get_count(lcmusic_app_data->file_iterator);
    lcmusic_app_data->track_no = 0;
}

void lcmusic_iterator_deinit(lcmusic_app_data_t* lcmusic_app_data)
{
    file_iterator_delete(lcmusic_app_data->file_iterator);
    lcmusic_app_data->file_iterator = NULL;
}
